Azure Data Studio failing to authenticate to github - github

How can I get Azure Data Studio (ADS) to log into github?
Last year it was connected, after I somehow input a "Personal access token". But, that recently got messed up, and now I can't recreate the steps from last year. Now, after opening my local folder in ADS (which was a previous clone of my github folder), I attempt to Push/pull 2 commits to github. ADS prompts that the extension wants to sign into github, which I "Allow". That redirects me to an Internet Explorer page to "Continue", which should authorize the connection. However, the IE browser always responds "Oh no! An error occurred! Please restart the sign in process from the editor. Forbidden"
I think I need to (re)install a Personal Access Token into ADS, but I can't figure out how. Or, maybe there's some way to get the IE page to allow the process to Continue?

I would do the following:
Update Git on your desktop to the latest version
Start Azure Data Studio
Select a new folder, File > Open Folder
Click on source control on the left pane (ctrl+shift+g)
Click on Initialize
Create a new file and add a simple script select ##Version
Save the file and click on the plus sign to stage it
Commit and add a comment to the commit
On github, go to settings > Developer > Personal Access Tokens
Generate the token save it as you will not see it again once you leave the page
Create a new repository and copy the link
Go to AzureDataStudio, in source control, click on the three dots and select ADD Remote
13.Add Git Link you copied in step 11
14.Add the name
15.Add the token, you saved and copied on step 10 and you should now be able to authenticate with no errors
After the above steps, I was able to create and link new repos with no issues.
Moreover, I didn't need to use the PAT again but keep it handy and save it as you would do with a password.

Related

PyCharm GitHub error "git#github.com: Permission Denied (publickey)"

Ok about 2 hours ago I enabled the VCS as GitHub, then went in and did the Oauth (I think its called) where JetBrains opens a browser and asks me to authorize GitHub. Then I clicked admin, create a repo, add comments, add read comments, and other stuff to authorize PyCharm to create a repo and push via the app.
Now I'm still getting errors, it pushed to create a repo... but there is no code inside.
Why isn't this a simple process? I've enabled it, and setup GPG access but it refuses to sync my code.
Now under preferences>version control the directory just shows despite my project having a name and over 500 files.
Under Preferences > Version Control > Github it shows my GitHub icon, I tried login in thru the IntelliJ button and I've synced a token. Neither worked
Pycharm is supposed to be a simple way to learn to develop stuff and be integrated.
What am I missing as I'm authorized on PyCharm Professional as a student.
git#github.com: Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
I didn't find how to fix this in pyCharm, but it worked for me when I saved my private key (matching the one authorized in GitHub) in my ${HOME}/.ssh/id_rsa.
Hope it helps.

How to disconnect Github account from Visual Studio Code

I am using VS Code on Linux mint. I was pushing to a git repo a few weeks ago and since the repo was private, github asked for authentication as it would. A browser window opened and asked if I want to keep this account for VS Code for all future git pushes, so I did that. Now I need to remove my this account from my VS Code. Now every time I try to push something via the VS terminal, it tries to push using that account. I need to remove that account and possibly add another one. I can not find this anywhere in the settings.
Below Solution worked for me hope this will work for someone
You can delete your toke loggen in the account at github.
delete the token for the designated PC.
GithubSite -> Login -> Settings -> Developer Settings -> Personal Access Token -> Delete (Token For that PC Name) -> click Agree (I Understand, delete this token)
Open your Visual Studio Code Then look at the bottom left side there will be an Account option Clicking On it after you will see the Sign Out Option is there.

Publishing a Project on GitHub

I want to use this way to upload my project to GitHub (Source):
To publish you project sources on GitHub
On the main menu, choose VCS | Import into Version Control | Share
Project on GitHub .
If you have registered login and password,
PhpStorm establishes connection with GitHub using these credentials.
If you have not registered your GitHub credentials in PhpStorm, the
Login to GitGub dialog box. Specify your GitHub login and password or
create an account there.
Upon establishing connection, the Share
Project on GitHub dialog box opens. Specify the name of the repository
to store your project sources in. By default, PhpStorm suggests the
name of the current project. Provide a brief description of the
project functionality. Click the Share button. PhpStorm initiates
creation of the new repository on the GitHub and uploads the project
sources to it.
First step works, added my GitHub login data, test the connection and it works.
Now upon step 2, after clicking the Share Project on GitHub link this error shows up:
Error Running Git.
Cannot run program "git.exe": CreateProcess error=2, The system can not find the file specified
What do I need to do to make this work?
The OS is seemingly Windows but what version?
This might be what you need tough: I can't find my git.exe file in my Github folder

egit - not authorized

I just connected to GIT from Eclipse Juno using EGit, and successfully cloned a certain remote repository. During the clone I entered my Github username and password, but chose not to save them.
Then I tried to "Fetch from Upstream". I got this error:
https://github.com/biunlp/nlp-lab.git: not authorized
I had no chance of entering my username and password...
This is strange since I connected to this repository in order to clone...
Update 2022: In what follows, always use:
a App password, not your account password (see blog post).
So create your app password.
a BitBucket Cloud, since BitBucket server will be discontinued in Feb. 2024.
A. To specify credentials individually for each remote
Open Git repositories view,
open "Remotes > origin > <your push url>"
click "Change Credentials..."
(From User Guide - Resource Context Menu)
B. To specify credentials per server
If you want to access multiple repositories on the same server without providing the same credentials multiple times, you may use .netrc. With this, eGit will use the configuration you provide.
Create a text file called .netrc (_netrc in Windows) in the user home directory.
Add content to the file in this form:
machine my.server1.com
login yourUserName
password yourPassword
machine my.server2.com
login yourUserName
password yourPassword
The Stash documentation contains more information about .netrc
Security issue The problem with using .netrc this way is that the password is visible in plain text. Refer to this answer in Stackoverflow to solve that problem.
More secure option (2022): EGit (from issue 441198) can be made (with an extension) to recognize a native Git credential helper, using a secure encrypted cache:
install a native Git
install the GCM (Git Credential Manager), which is cross-platform, and already package with Git For Windows for instance.
instruct EGit to look for credentials in the GCM: gitflow-incremental-builder/gitflow-incremental-builder
register your password or token in said GCM
printf "Host=my.server1.com\nprotocol=https\nusername=yourUsername1\npassword=passwd1" | \
git credential-manager-core store
# and:
printf "Host=my.server1.com\nprotocol=https\nusername=yourUsername1\npassword=passwd1" | \
git credential-manager-core store
Look for executable git-credential-manager-core, and add its folder to your %PATH%/$PATH.
You can try:
eclipse/myeclipse > menu
window > preferences > general > security >
content > click "delete" > ok
If you're using Two Factor Authentication on GitHub, the "not authorized" error can be returned even if you are using the correct username and password. This can be resolved by generating a personal access token.
After generating the secure access token, we'll use this instead of a password. Make sure not to leave the page before you're done, because once you leave the page, you'll never see it again (thankfully it can be regenerated, but anything using the previously generated token will cease to authenticate).
This assumes that you've successfully installed EGit and that you've successfully cloned a repository.
Go to your GitHub.com settings, and in the left hand pane click Personal access tokens.
Click Generate new token. Select the scopes that you'd like this token to be able to use, and generate it.
Copy the token. It should look something like this: 9731f5cf519e9abb53e6ba9f5134075438944888 (don't worry, this is invalid).
Back in Eclipse (Juno, since that's OP's version), click Window > Show View > Other.... Under Git, select Git Repositories.
A new pane appears, from which you can open (repository name) > Remotes > origin.
Right click on a node and choose Change Credentials.... Enter your username for User, and your secure access token for the Password.
I had a similar problem when I changed my password on the remote repository.
Here is how I fixed it on Eclipse on Mac:
Important Note: These instructions have the side effect of clearing all passwords and other secure information. I was fine with that, but you will want to consider that before you follow these instructions.
Click Eclipse -> Preferences on menu.
Expect a popup window called Preferences.
Expand the "General" tree item.
Double click the "Security" tree item.
Expect the main pane of the popup to change to "See 'Secure Storage' for..."
Click 'Secure Storage'.
Expect the main pane to change to tabbed window.
Click the "Contents" tab.
Click "Delete".
Accept a warning that all your secure information is deleted.
Click "Cancel" or "Apply" to exit the popup window.
Click the 'Git Pull' icon and expect to be prompted for username and password.
This worked for me:
Go to Git profile-> Settings -> developer settings-> personal access tokens
delete if any existing token and generate a new token [provide note, specify no.of days and repo checked] ->Copy the new token generated
Goto eclipse and now when the same login prompt appears, try providing the personal token generated as password instead of Git password.
Bitbucket Cloud recently stopped supporting account passwords for Git authentication. From march 2022.
So use app password. Please read more information on below links.
Bitbuckect Announcement
Bitbuckect blog
App password

Possible to Connect Netbeans with GitHub?

I know the Git integration is Netbeans 7.0 is new and under development, but has anyone had success on pushing/pulling to GitHub?
When I click Git->Push the remote repository url shows up correctly under Step 1. Configured Repository.
But is just stays stuck on " Connecting to repository". It also pops up a box saying "Specify Git repository location" with the exact same url , clicking OK does nothing.
If instead I choose "Specify Git Repository Location" I eventually get an error, "Cannot connect to the remote repository at git#github.com:username/..."
ps. I am aware of the other similar stack questions but they are confusing, one person mentions that he was able to do this, while others mention is not yet possible to use a remote Git connection.
I have had the same issue.
And now it works fine for me.
I have done this:
1 With CLI ( Terminal for me) Define your remote repo :
cd yourlocalfolder
git remote add origin git#github.com:username/repo.git
2 Open Netbeans (7.1 for me)
Go to Team > Git > Remote > Push
3 You should see your remote repo preselected
4 in Private /public key browse to your rsa file
usr/username/ssh/id_rsa
5 Click on Next
6 Done
You need check 'Specify Git Repository Location:'
'Repository URL:' https://github.com/<your username>/<yourGitFile>.git
'User:' <your username>
But is just stays stuck on " Connecting to repository". It also pops up a box saying "Specify Git repository location" with the exact same url , clicking OK does nothing.
I faced the exact same issue and after I did some research I found that the problem was with the password.
GitHub isn’t accepting passwords for Git operations anymore.
So instead of using a password, Github suggests using Personal Access Token.
Go to your Github account settings.
Go to Developer settings in the sidebar.
Go to Personal access tokens.
Generate new token.
Make sure to check repo scope checkbox to access your repositories.
After you get your access token you can copy it and past it in the password field in the "Specify Git repository location" window and try to push your project.